<<<<<<< HEAD
FROM php:7-alpine

RUN mkdir /src
WORKDIR /src

RUN cp /etc/apk/repositories /etc/apk/repositories.bak && \
echo "http://mirrors.aliyun.com/alpine/v3.4/main/" > /etc/apk/repositories && \
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS linux-headers tar curl && \
    #docker-php-ext-install json xml pdo phar opcache pdo_mysql zip iconv mcrypt bcmath dom pcntl pdo_sqlite \
    pecl install swoole && \
    docker-php-ext-enable swoole && \
    apk del .phpize-deps && \
    rm -rf /var/cache/apk/* && \
	rm -rf /tmp/* \

# ADD php.ini    /usr/local/etc/php/php.ini
# ADD php-fpm.conf    /usr/local/etc/php-fpm.conf

#安装composer
#ADD composer.phar /usr/local/bin/composer
#RUN chmod 755 /usr/local/bin/composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer

EXPOSE 9000
=======
FROM php:7-alpine

RUN mkdir /src
WORKDIR /src

# 修改成国内的源
RUN cp /etc/apk/repositories /etc/apk/repositories.bak && \
	echo "https://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories

# 安装swoole
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS linux-headers tar curl wget util-linux && \
    docker-php-ext-install opcache pdo_mysql bcmath  pcntl && \
    pecl install swoole && \
    docker-php-ext-enable swoole && \
    apk del .phpize-deps && \
    rm -rf /var/cache/apk/* && \
	rm -rf /tmp/*

# 安装 composer 允许使用root账户
# ENV COMPOSER_ALLOW_SUPERUSER 1
# RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
# 	composer config -g repo.packagist composer https://packagist.phpcomposer.com

ADD php.ini    /usr/local/etc/php/php.ini
# ADD php-fpm.conf    /usr/local/etc/php-fpm.conf

#安装composer
# ADD composer.phar /usr/local/bin/composer
# RUN chmod 755 /usr/local/bin/composer 

EXPOSE 9501

# RUN php -i && php -m
>>>>>>> a6ed3583e5a1faf3b5aebb6729ad2c61f0114326
